package com.bishe.controller;

import cn.dev33.satoken.stp.StpUtil;
import com.bishe.pojo.query.IndexQuery;
import com.bishe.pojo.response.Result;
import com.bishe.service.IndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("index")
@Api(tags = "首页控制器")
public class IndexController {

    @Resource
    private IndexService indexService;

    @ApiOperation("首页账单数据")
    @GetMapping("/indexData")
    public Result<?> indexData(IndexQuery query){
        return Result.ok(indexService.getIndexData(query));
    }

}
